<extend name="Public/base"/>

<block name="style">
	<link rel="stylesheet" href="__STATIC__/plugins/data-tables/DT_bootstrap.css" />
</block>

<block name="body">
    
    <div class="row">
        <div class="col-md-12">
            <!-- BEGIN EXAMPLE TABLE PORTLET-->
            <div class="portlet box green">
                <div class="portlet-title">
                    <div class="caption"><i class="fa fa-globe"></i>{$title}内容列表</div>
                    <div class="tools">
                        <a href="javascript:;" class="collapse"></a>
                        <a href="#portlet-config" data-toggle="modal" class="config"></a>
                        <a href="javascript:;" class="reload"></a>
                    </div>
                </div>
                <div class="portlet-body">
                    <empty name="custom_adminlist">
                    <div class="table-toolbar">
                        <div class="btn-group"> 
                            <a class="btn green" href="{:U('edit',array('name'=>$name))}">新 增</a>
                            <button class="btn green ajax-post confirm" target-form="ids" url="{:U('del?name='.$name)}">删 除</button>
                        </div>

                        <div class="btn-group pull-right">
                            
                            <div class="input-group input-medium">
                                <input type="text" class="form-control search-input" name="title" placeholder="">
                                <span class="input-group-btn">
                                <button class="btn green" type="button"  id="search" url="{:U('Article/index',array('cate_id'=>$cate_id))}">搜索</button>
                                </span>
                            </div>

                        </div>
                    </div>
                    <table class="table table-striped table-bordered table-hover" id="sample">
                        <thead>
                            <tr>
                                <th class="table-checkbox"><input type="checkbox" class="group-checkable" data-set="#sample .checkboxes" /></th>
                                <volist name="list_grid" id="vo">
                                <th>{$vo.title}</th>
                                </volist>
                            </tr>
                        </thead>
                        <tbody>
                            <volist name="_list" id="lv" key="vo">
                            <tr>
                                <td><input class="ids checkboxes" type="checkbox" value="{$lv.id}" name="ids[]">{$lv.id}</td>
                                <volist name="list_grid" id="lk">
                                    <td>{:get_addonlist_field($lv, $lk, $name)}</td>
                                </volist>
                            </tr>
                            </volist>
                        </tbody>
                    </table>
                    <else />
                        <present name="custom_adminlist">
                            {$custom_adminlist}
                        </present>
                    </empty>
                    <!-- 分页 -->
                    <div class="page">
                        {$_page}
                    </div>
                </div>
            </div>
            <!-- END EXAMPLE TABLE PORTLET-->
        </div>
    </div>
</block>

<block name="script">
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="__STATIC__/plugins/data-tables/jquery.dataTables.js"></script>
	<script type="text/javascript" src="__STATIC__/plugins/data-tables/DT_bootstrap.js"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL SCRIPTS -->
	<script src="__STATIC__/scripts/app.js"></script>
	<script src="__STATIC__/scripts/table-managed.js"></script>     
	<script>
		jQuery(document).ready(function() {       
		   App.init();
		   TableManaged.init();
		});
	</script>
</block>